class ProfilesController < ApplicationController
  def new
    @profile = Profile.new
  end

  def create
    @profile = Profile.new(params[:profile])
    respond_to do |format|
      if @profile.save
        flash[:keep] = 'You\'ve been successfully signed up'
        format.html {
          session[:signed_up] = true
          redirect_to session[:request_uri] if session[:request_uri]
          redirect_to :home unless session[:request_uri]
          }
      else
        format.html { render :action => 'new'}
      end
    end
  end
end